package com.tutos.ui.student;

import javax.inject.Inject;

import com.tutos.dao.EstudianteDAO;
import com.tutos.dao.MonitorDAO;
import com.tutos.ui.BaseMain;
import com.tutos.ui.MenuBase;
import com.tutos.ui.monitor.HorarioGrafico;
import com.tutos.ui.monitor.Tutorial;
import com.vaadin.terminal.Sizeable;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Panel;

public class MainStudent implements BaseMain, MenuBase.MenuListener {

	private HorizontalSplitPanel panel = new HorizontalSplitPanel();
	private MenuBase menu;
	private EstudianteDAO dao;
//	private Tutorial tuto;
	
	@Inject
	public MainStudent(MenuBase menuBase, EstudianteDAO dao){
		this.menu = menuBase;
		this.dao = dao;
		
		menu.addListener(this);
		
		panel.setLocked(true);
		panel.setSplitPosition(200, Sizeable.UNITS_PIXELS);
		panel.setFirstComponent(menu.getComponent());
		panel.setSplitPosition(100, Sizeable.UNITS_PERCENTAGE);
		panel.setSizeFull();
		panel.setSplitPosition(9);
	}
	
	
	@Override
	public Component getComponent() {
		return panel;
	}


	@Override
	public void menuClick(Component component) {
		panel.setSecondComponent(component);
	}

}
